package com.libre.components;

import com.libre.constant.SysConstant;
import javafx.event.ActionEvent;
import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.image.ImageView;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;

/**
 * 打印
 */
public class Upload extends Stage {
    public VBox upload() {
        VBox vBox = new VBox();
        // 边框
        BorderStroke borderStroke = new BorderStroke(null, null, null, null,
                BorderStrokeStyle.DASHED, BorderStrokeStyle.DOTTED, BorderStrokeStyle.DOTTED, BorderStrokeStyle.DOTTED,
                null, BorderWidths.DEFAULT, new Insets(0));
        Border border = new Border(borderStroke);
        vBox.setBorder(border);
        // vBox.setPadding(new Insets(10));
        // 背景
        vBox.setMinWidth(SysConstant.DEFAULT_WIDTH-20);
        BackgroundFill bgFill = new BackgroundFill(Color.valueOf("BBFFFF"), new CornerRadii(10), new Insets(0));
        vBox.setBackground(new Background(bgFill));
        // Icon
        ImageView imageView = new ImageView(SysConstant.UPLOAD_ICON);
        imageView.setFitWidth(50);
        imageView.setFitHeight(50);
        // 提示
        Label label = new Label("拖拽文件开始上传或者点击选中上传");
        label.setFont(Font.font("Amble CN", FontWeight.EXTRA_BOLD, 20));

        vBox.getChildren().addAll(imageView, label);
        return vBox;
    }
}
